package domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.NotBlank;
/**
 * 
 * 	证书
 * 
 * @author oyang
 *
 */
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
//@DiscriminatorColumn(name="type",discriminatorType=DiscriminatorType.STRING)
//@NamedQueries({
//	@NamedQuery(name="findStaticPasswordById", query = "select password from StaticPassword where password.userId=:userId")
//})
public class Certificate {
	private String     id; //ID
	@NotBlank
	private String userId; //用户ID
	private String   type; //证书类型 password，动态密码 等
	@Id
	@GeneratedValue(generator="system-uuid")
	@GenericGenerator(name="system-uuid",strategy = "uuid")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	
	
}
